package ooday04;

public class Test{
    public static void main(String[] args) {
        Person[] ps = new Person[5];
        ps[0] = new Student("zhangsan",25,"lf","220301");
        ps[1] = new Student("lisi",27,"jms","220301");
        ps[2] = new Teacher("wangwu",50,"sd",3533.4);
        ps[3] = new Teacher("dalao",60,"sh",35063.3);
        ps[4] = new Doctor("xiaodi",20,"hn","chuji");
        for (int i = 0; i < ps.length; i++) {
            System.out.println(ps[i].name);
            ps[i].sayHI();
        }
        Student zs = new Student("zhangsan",25,"lf","220301");
        Person p = new Student("lisi",26,"jms","220302");
        zs.sayHI();
        p.sayHI();
    }
}
